home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
501 Great Games
/
501 Great Games - Volume One (2001)(Guildhall Leisure Services).iso
/
COMPSV32
/
SCRIPTS.LIB
/
INFONET.SCR
< prev
next >
Wrap
Text File
|
1996-09-23
|
3KB
|
126 lines
!
! Copyright (c) 1996
! by CompuServe Incorporated, Columbus, Ohio
!
! The information in this software is subject to change without
! notice and should not be construed as a commitment by CompuServe.
!
! InfoNet:
! Connect to InfoNet or InfoNet-Europe. Arg1 contains TRUE if
! connect is to InfoNet-Europe and FALSE otherwise.
! Success: returns %Success
! Failure: saves error msg in %FailureMsg and returns %Failure
! Arg1: 0 - InfoNet World, 1 - InfoNet Europe, 2 - Infonet Korea,
! 3 - InfoNet Taiwan, 4 - InfoNet Mexico, 5 - InfoNet S. Africa
!+V
! "3.9.1"
!-V
Which_InfoNet = Arg1;
if Which_InfoNet = 1 goto Init_Europe;
if Which_InfoNet = 2 goto Init_Korea;
if Which_InfoNet = 3 goto Init_Taiwan;
if Which_InfoNet = 4 goto Init_Mexico;
if Which_InfoNet = 5 goto Init_SAfrica;
show "Connecting to InfoNet World";
FailStr = "InfoNet World not responding";
FailStr2 = "InfoNet World not connecting";
goto Init_Common;
Init_Europe:
show "Connecting to InfoNet Euro";
FailStr = "InfoNet Euro not responding";
FailStr2 = "InfoNet Euro not connecting";
goto Init_Common;
Init_Korea:
show "Connecting to InfoNet Korea";
FailStr = "InfoNet Korea not responding";
FailStr2 = "InfoNet Korea not connecting";
goto Init_Common;
Init_Taiwan:
show "Connecting to InfoNet Taiwan";
FailStr = "InfoNet Taiwan not responding";
FailStr2 = "InfoNet Taiwan not connecting";
goto Init_Common;
Init_Mexico:
show "Connecting to InfoNet Mexico";
FailStr = "InfoNet Mexico not responding";
FailStr2 = "InfoNet Mexico not connecting";
goto Init_Common;
Init_SAfrica:
show "Connecting to InfoNet South Africa";
FailStr = "InfoNet South Africa not responding";
FailStr2 = "InfoNet South Africa not connecting";
! fall through
Init_Common:
Tries = 5;
Timeout = 10;
Got_Center = %FALSE;
on cancel goto Return_Cancel;
Wait_InfoNet:
wait
%mdm_Failure goto NO_Carrier,
"CLR ERR" goto InfoNet_Failure,
"#" goto Send_Response,
"Center" goto Send_InfoNet_Host,
"Centre" goto Send_InfoNet_Host,
"COMMUNICATION" goto Return_Success
until Timeout;
Timeout = 50;
if Tries = 0 goto InfoNet_Failure;
Tries = Tries - 1;
send %CR & %CR & %CR;
goto Wait_InfoNet;
Send_Response:
if Got_Center goto Wait_InfoNet;
send "C" & %CR;
Timeout = 195;
goto Wait_InfoNet;
Send_InfoNet_Host:
show "Sending CompuServe Address...";
if Which_InfoNet = 0 goto Send_InfoNet_World_Host;
if Which_InfoNet = 1 goto Send_InfoNet_Europe_Host;
send "CPS" & %CR;
goto Finish_Send_Host;
Send_InfoNet_World_Host:
send "CSI" & %CR;
goto Finish_Send_Host;
Send_InfoNet_Europe_Host:
send "CSF" & %CR;
goto Finish_Send_Host;
Finish_Send_Host:
FailStr = FailStr2;
if Tries = 0 goto InfoNet_Failure;
Tries = Tries - 1;
Got_Center = %TRUE;
Timeout = 835;
goto Wait_InfoNet;
NO_Carrier:
FailStr = "Modem connection lost";
InfoNet_Failure:
define %FailureMsg = FailStr;
exit %Failure;
Return_Cancel:
exit %Cancel;
Return_Success:
exit %Success;